{extend name='base' /}

{block name='main'}
<link rel="stylesheet" href="__CSS__/booklist.css">
<style>
    .main {
        background: url("__IMG__/list_bg.jpg") left top repeat-y;
    }

    .right .book_list a .bookcover {
        background: url(__IMG__/shadow_114_162.png) 3px 6px no-repeat;
    }
</style>
<div class="row m-0 mt-3 main">
    <div class="left">
        <div class="left_nav">
            {foreach $category as $k => $v}
            <div class="first_level {if $v['id']==$catid}selected{/if}">
                <a class="card-link" href="{:url('category/index', array('catid' => $v['id']))}">
                    <h3 class="whole m-0">
                        {$v.catname}
                    </h3>
                </a>
            </div>
            {/foreach}
        </div>
    </div>
    <div class="right flex-1">
        <div class="book_list">
            {foreach $book as $k => $v}
            <a href="{:url('book/info', array('bookid' => $v['id']))}">
                <span class="bookcover">
                    <img src="{$v['thumb']}" alt="{$v.bname}">
                </span>
                <div class="bookinfo">
                    <div class="title">{$v.bname}</div>
                    <div class="author">{$v.author}</div>
                    <div class="startie"></div>
                    <div class="price">
                        <span class="now">￥{$v.price}</span>
                    </div>
                    <div class="des">
                        {$v.content}
                    </div>
                </div>
            </a>
            {/foreach}
        </div>
        <nav aria-label="Page navigation example" style="clear: both;">
            {$page|raw}
        </nav>
    </div>
</div>
{/block}

{block name="js"}
<script>

</script>
{/block}